package com.fengycx.fallback;

import com.fengycx.feign.DriverHbaseGeoApi;
import com.fengycx.pojo.vo.PointVo;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class DriverHbaseGeoApiFallbackFactory implements FallbackFactory<DriverHbaseGeoApi> {

    @Override
    public DriverHbaseGeoApi create(Throwable cause) {
        cause.printStackTrace();
        return new DriverHbaseGeoApi() {
            @Override
            public List<PointVo> getDriverGeoList(String orderNo) {
                return null;
            }
        };
    }
}
